﻿#parse("Partials/header.html") #parse("Partials/sidebar.html")
<script type="text/javascript" src="/Scripts/jquery.table.addrow.js"></script>
<script>
    jQuery(document).ready(function () {
        jQuery("#mws-validate-purchasing-item").submit(
            function () {
                if (jQuery("#mws-validate-purchasing-item").valid() == true) {
                    jQuery.blockUI();
                    var post_data = jQuery(this).serialize();
                    var form_action = jQuery(this).attr("action");
                    var form_method = jQuery(this).attr("method");
                    jQuery.ajax({
                        type: form_method,
                        url: form_action,
                        cache: false,
                        dataType: "json",
                        data: post_data,
                        success: function (data) {
                            jQuery("#notif").html(data['strNotification']);
                            jQuery.unblockUI();
                        },
                        error: function (data) {
                            jQuery.unblockUI();
                        },
                        complete: function () {

                        }
                    });
                }
                return false;
            });
        $("#ItemRefCategoryId").change(function () {
            var parentId = $(this).val();

            $("#ItemSubCategoryId option").each(function () {
                var data = $(this).attr("idparent");

                if (data == parentId || data == 0) {
                    $(this).show();
                }
                else {
                    $(this).hide();
                }
            });
            $("#ItemSubCategoryId").val(0);
        });

//        $('td:nth-child(1)').hide();
    });
</script>
<!--<script type="text/javascript">
    (function($){
    $(document).ready(function(){
    $(".addRow").btnAddRow();
    $(".delRow").btnDelRow();
    });
    })(jQuery);
</script>-->
<style>
    div#datalist_filter
    {
        display: none;
    }
    div#datalist_length
    {
        display: none;
    }
    .mws-table thead
    {
        margin-top: -10px;
    }
</style>
<div id="mws-container" class="clearfix">
    <!-- Inner Container Start -->
    <div class="container">
        <!-- Panels Start -->
        <div class="mws-panel grid_8">
            <div class="mws-panel-header">
                <span class="mws-i-24 i-table-1">$Pagetitle</span>
            </div>
            <div class="mws-panel-body">
                <div class="mws-panel-toolbar top clearfix">
                    <ul>
                        <li><a class="mws-ic-16 ic-arrow-left" href="/master/itemdata" title="Accept">Back To
                            Item List</a></li>
                        <li><a class="mws-ic-16 ic-add" href="/master/itemdata/createitemdata" title="Accept">
                            Add Item</a></li>
                    </ul>
                </div>
                <div id="notif">
                    $Notification</div>
                <div class="mws-form" action="#">
                    <div class="mws-form-inline">
                        <form method="post" action="/master/itemdata/saveitemdatatoservice/" id="mws-validate-purchasing-item"
                        class="crud">
                        <input type="hidden" value="$IsCreate" name="IsCreate" id="IsCreate" />
                        <input type="hidden" value="$sysItem.Id" name="Id" id="Id" />
                        <div class="mws-form-row">
                            <label>
                                Code <span style="color: #FF0000; font-size: medium;">*</span></label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input class="mws-textinput required" maxlength="50" id="ItemCode" name="CodeValue"
                                                type="text" type="text" value="$sysItem.CodeValue" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Name <span style="color: #FF0000; font-size: medium;">*</span></label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-2-8 alpha">
                                        <div class="mws-form-item">
                                            <input class="mws-textinput required" maxlength="50" id="ItemName" name="NameValue"
                                                type="text" type="text" value="$sysItem.NameValue" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Category</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlItemCategory
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>
                                Sub Category</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlItemSubCategory
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="mws-form-row">
                            <label>Shape</label>
                            <div class="mws-form-item large">
                                <div class="mws-form-cols clearfix">
                                    <div class="mws-form-col-3-8 alpha">
                                        <div class="mws-form-item">
                                            $ddlItemShape
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--<div class="mws-form-inline">
                        <table class="mws-table" style="width:100%">
                            <tr class="del"><td colspan="3">Enter Your Information <input type="button" class="addRow" value="Add Row"/></td></td></tr>
                            <tr class="del"><td>Email</td><td><input type="text" size="24"/></td>
                            <td><input type="button" class="delRow" value="Delete Row"/></td></tr>   
                        </table>
                        </div>-->
                        <div class="mws-form-inline">
                            <div class="mws-form-row">
                                <br />
                                <span style="color: #FF0000; font-size: large;">*</span><span style="color: #FF0000;">
                                    : Mandatory</span>
                            </div>
                        </div>
                        <div class="mws-button-row">
                            <input name="btnAction" class="mws-button red" type="submit" value="Save" />
                            <input class="mws-button gray" type="reset" value="Reset" />
                        </div>
                        </form>
                    </div>
                </div>
            </div>
            <!-- Panels End -->
        </div>
        <!-- Inner Container End -->
    </div>
#parse("partials/footer.html") 